Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add statefulsets to the dashboard and CLI #2234

Merged
merged 2 commits into from
Feb 8, 2019
Merged

Conversation

ihcsim
Copy link
Contributor

@ihcsim ihcsim commented Feb 8, 2019

This PR adds statefulset resources to the dashboard, CLI and grafana. Note that at present, no TCP metrics will appear. See #2223 and #2224.

The screenshots below show test results with redis and nginx, used to demonstrate http and tcp traffic metrics.

image

image

image

image

image

$ bin/linkerd tap statefulset --namespace default
req id=6:1 proxy=in  src=172.17.0.17:58894 dst=172.17.0.15:80 tls=true :method=GET :authority=nginx.default :path=/
rsp id=6:1 proxy=in  src=172.17.0.17:58894 dst=172.17.0.15:80 tls=true :status=200 latency=3054µs
end id=6:1 proxy=in  src=172.17.0.17:58894 dst=172.17.0.15:80 tls=true duration=33µs response-length=14B
$ bin/linkerd top statefulset --namespace default
(press q to quit)

Source  Destination  Method      Path   Count    Best   Worst    Last  Success Rate
curl    nginx-0      GET         /         28   435µs     5ms     5ms       100.00%
curl    nginx-2      GET         /          7   510µs     5ms     5ms       100.00%
curl    nginx-2      GET         /         14   487µs     5ms     2ms       100.00%

Fixes #1983

Signed-off-by: Ivan Sim ivan@buoyant.io

Signed-off-by: Ivan Sim <ivan@buoyant.io>
@ihcsim ihcsim force-pushed the isim/statefulsets-stats branch from c4fe1f8 to 96ef90c Compare February 8, 2019 18:45
Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! mostly cosmetic comments around statefulset -> sts, and sorting resource types.

we are not great about sorting our k8s resource types, but as the number of types grows, i think it becomes more important. not every code path uses exactly the same set of resources, so sort order helps in identifying differences. i noted a few particular sorting locations in the code review, but not all of them. with that in mind, a few guiding principles:

  • if a list of resources is already sorted, keep it sorted
  • if you encounter code where sorting is not correct, feel empowered to clean it up
  • there may be exceptions for UI/doc purposes. the stat help output sorts some exceptional resources at the bottom, but all things being equal, i'd recommend resorting the first 6 items together, then sort the 3 exceptional types together, and then all at the bottom.
  Valid resource types include:
  * daemonsets
  * deployments
  * namespaces
  * pods
  * replicationcontrollers
  * statefulsets
  * authorities (not supported in --from)
  * jobs (only supported as a --from or --to)
  * services (only supported if a --from is also specified, or as a --to)
  * all (all resource types, not supported in --from or --to)

Signed-off-by: Ivan Sim <ivan@buoyant.io>
Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 nice!!!

Copy link
Member

@siggy siggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🚢 👍

@ihcsim ihcsim merged commit f6e75ec into master Feb 8, 2019
@ihcsim ihcsim deleted the isim/statefulsets-stats branch February 8, 2019 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants